package com.venta.autopartes.car;

import java.util.ArrayList;
import java.util.List;

public class Equipment {
	private String equipment;

	private List<VehicleCharacteristic> characteristicsList=new ArrayList<VehicleCharacteristic>();

	public List<VehicleCharacteristic> getCharacteristicsList() {
		return characteristicsList;
	}

	public void setCharacteristicsList(List<VehicleCharacteristic> characteristicsList) {
		
		this.characteristicsList = characteristicsList;
	}

	public String getEquipment() {
		return equipment;
	}

	public void setEquipment(String equipment) {
		System.out.println("Equipment Selected : " + equipment);
		this.equipment = equipment;
	}
	
	public String getEquipmentSummary(){
		String equipmentSummary="";
		
		int summaryCounter=0;
		
		for (VehicleCharacteristic vehicleCharacteristic:this.characteristicsList){
			equipmentSummary=equipmentSummary+" : " +vehicleCharacteristic.getCharacteristic() + " ";
			for (VehicleCharacteristicProperty vehicleCharacteristicProperty:vehicleCharacteristic.getPropertiesList()){
				if(summaryCounter<10){
					equipmentSummary=equipmentSummary+" : " +vehicleCharacteristicProperty.getProperty()+ ", ";
					summaryCounter++;
				}
			}
			
			equipmentSummary=equipmentSummary+" -- ";
		}
		
		return equipmentSummary;
	}
	
	
	
	
}
